#include<bits/stdc++.h>

using namespace std;
int data[200000 + 100], head = 0, tail = -1;

int main() {
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &data[++tail]);
    }
    while (tail >= head) {
        printf("%d ", data[head++]);
        if (tail < head) {
            break;
        }
        int x = data[head++];
        data[++tail] = x;

    }

    return 0;
}